package cn.beyond.vehicleManagement.service;

import cn.beyond.vehicleManagement.dao.VehicleDeprecitionDao;
import cn.beyond.vehicleManagement.pojo.VehicleDeprecition;
import cn.beyond.vehicleManagement.util.DataBaseUtil;

import java.util.List;
import java.util.Map;

public class VehicleDeprecitionService {
    VehicleDeprecitionDao dao = new VehicleDeprecitionDao();



    /**
     * 添加车辆折旧
     * @return
     */
    public int addVehicleDeprecition(VehicleDeprecition vehicleDeprecition){
        return    dao.addVehicleDeprecition(vehicleDeprecition);
    }

    /**
     * 删除折旧车辆
     * @param obj
     * @param column
     * @return
     */
    public int deleteVehicleDeprecition(Object obj,String column){
        return dao.deleteVehicleDeprecition(obj,column);

    }

    /**
     * 修改折旧车辆
     * @return
     */
    public int update(VehicleDeprecition vehicleDeprecition){
        return  dao.update(vehicleDeprecition);
    }

    /**
     * 查询结果返回单条记录
     * @param selectmap
     * @return
     */
    public VehicleDeprecition selectUserByOne(VehicleDeprecition vehicleDeprecition, Map<String, Object> selectmap){
        return dao.selectUserByOne(vehicleDeprecition,selectmap);
    }

    /**
     * 查询结果返回多条记录
     * @param selectmap
     * @return
     */
    public List<VehicleDeprecition> selectUserByCondition(VehicleDeprecition vehicleDeprecition, Map<String,
            Object> selectmap){
        return  dao.selectUserByCondition(vehicleDeprecition,selectmap);
    }
}
